import request from '../request-axios.js';
import { API_CONFIG } from '../config.js';

// 数据采集API
export const collectionAPI = {
  // 开始数据采集
  startCollection: (data) => {
    return request.post(API_CONFIG.ENDPOINTS.COLLECTION_START, null, { params: data });
  },

  // 停止数据采集
  stopCollection: (data) => {
    return request.post(API_CONFIG.ENDPOINTS.COLLECTION_STOP, null, { params: data });
  },

  // 获取采集状态
  // getCollectionStatus: () => {
  //   return request.get(API_CONFIG.ENDPOINTS.COLLECTION_STATUS);
  // },

  // 获取采集历史记录
  // getCollectionHistory: (params = {}) => {
  //   return request.get(`${API_CONFIG.ENDPOINTS.COLLECTION_STATUS}/history`, { params });
  // },

  // // 获取采集配置
  // getCollectionConfig: () => {
  //   return request.get(`${API_CONFIG.ENDPOINTS.COLLECTION_STATUS}/config`);
  // },

  // 更新采集配置
  // updateCollectionConfig: (data) => {
  //   return request.put(`${API_CONFIG.ENDPOINTS.COLLECTION_STATUS}/config`, null, { params: data });
  // },

  // 暂停采集
  // pauseCollection: () => {
  //   return request.post(`${API_CONFIG.ENDPOINTS.COLLECTION_STATUS}/pause`);
  // },

  // 恢复采集
  // resumeCollection: () => {
  //   return request.post(`${API_CONFIG.ENDPOINTS.COLLECTION_STATUS}/resume`);
  // },

  // 获取采集进度
  // getCollectionProgress: () => {
  //   return request.get(`${API_CONFIG.ENDPOINTS.COLLECTION_STATUS}/progress`);
  // },

  // 获取采集统计信息
  // getCollectionStats: (params = {}) => {
  //   return request.get(`${API_CONFIG.ENDPOINTS.COLLECTION_STATUS}/stats`, { params });
  // }
};

export default collectionAPI; 